package com.atguigu.boot.controller;

import com.atguigu.boot.bean.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * ClassName: HelloController
 * Package: com.atguigu.boot.controller
 * Description:
 *
 * @Author Root
 * @Create 2023/5/25 16:09
 * @Version 1.0
 */
@RestController
public class HelloController {

    @Value("${person.name:李四}")
    private String name;

    @Value("${MAVEN_HOME}")
    private String msg;

    @Autowired
    private Person person;
    @GetMapping("/")
    public Person hello(){

        return person;
    }


    @GetMapping("/msg")
    public String getMsg(){
        return msg;
    }

}
